﻿using Prism.Commands;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfApp_PrismBaseObject.ViewModels;

public class MainViewModel:BindableBase
{
	private string? _value;

	public string? Value
	{
		get { return _value; }
		set 
		{ 
			//第一种方式
			SetProperty(ref _value, value);

			//_value = value;
            //第二种方式
            //this.RaisePropertyChanged(nameof(Value));

            //第三种方式
            //this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs(nameof(Value)));
        }
	}

	public DelegateCommand BtnCommand1 { get; set; }

	public DelegateCommand<string> BtnCommand2 { get; set; }

	public MainViewModel()
	{
		this.Value = "1111";

		BtnCommand1 = new DelegateCommand(() => 
		{
			
		});

		BtnCommand2 = new DelegateCommand<string>(args => 
		{
			
		});

    }

}
